import axios from '../../axios';
const STUDENTS_URL = '/admins';

const adminsApi = {
    //登录验证
    isLogin(token) {
        return axios({
            url: STUDENTS_URL + '/isLogin',
            method: "get",
            params: token
        })
    },
    //超级管理员登录
    SuperAdminslogin(data) {
        return axios({
            url: '/admins/superAdminsLogin',
            method: 'post',
            data,
        });
    },
    //新增管理员
    addAdmins(data) {
        return axios({
            url: STUDENTS_URL + '/addAdmins',
            method: 'post',
            data,
        })
    },
    //获取管理员列表
    getAdmins(data) {
        return axios({
            url: STUDENTS_URL + '/getAdmins',
            method: 'post',
            data,
        })
    },
    //修改管理员信息
    setAdmins(data) {
        return axios({
            url: STUDENTS_URL + '/setAdmins',
            method: 'post',
            data,
        })
    },
    //获取用户数据
    getData() {
        return axios({
            url: '/admins/getData',
            method: "get"
        })
    },
    //获取车位数据
    getData2() {
        return axios({
            url:'/admins/getData2',
            method:'get'
        })
    },
    //获得订单数据
    getData3(){
        return axios({
            url:'/admins/getData3',
            method:'get'
        })
    }
};
export default adminsApi;